home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / kernel / fsio / fsio.h < prev    next >
C/C++ Source or Header  |  1992-12-18  |  20KB  |  481 lines

  1. /*
  2.  * fsio.h --
  3.  *
  4.  *    Declarations of stream IO routines.
  5.  *
  6.  * Copyright 1989 Regents of the University of California
  7.  * Permission to use, copy, modify, and distribute this
  8.  * software and its documentation for any purpose and without
  9.  * fee is hereby granted, provided that the above copyright
  10.  * notice appear in all copies.  The University of California
  11.  * makes no representations about the suitability of this
  12.  * software for any purpose.  It is provided "as is" without
  13.  * express or implied warranty.
  14.  *
  15.  * $Header: /cdrom/src/kernel/Cvsroot/kernel/fsio/fsio.h,v 9.13 92/10/28 18:31:36 mgbaker Exp $ SPRITE (Berkeley)
  16.  */
  17.  
  18. #ifndef _FSIO
  19. #define _FSIO
  20.  
  21. #ifdef KERNEL
  22. #include <fs.h>
  23. #else
  24. #include <kernel/fs.h>
  25. #endif
  26.  
  27. /*
  28.  * Structure that is transfered when a stream is migrated with a process
  29.  */
  30.  
  31. typedef struct Fsio_MigInfo {
  32.     Fs_FileID    streamID;    /* Stream identifier. */
  33.     Fs_FileID    ioFileID;         /* I/O handle for the stream. */
  34.     Fs_FileID    nameID;        /* ID of name of the file.  Used for attrs. */
  35.     Fs_FileID    rootID;        /* ID of the root of the file's domain. */
  36.     int        srcClientID;    /* Client transfering from. */
  37.     int         offset;         /* File access position. */
  38.     int         flags;          /* Usage flags from the stream. */
  39. } Fsio_MigInfo;
  40.  
  41. /*
  42.  * Stream Types:
  43.  *    FSIO_STREAM        Top level type for stream with offset.  Streams
  44.  *                have an ID and are in the handle table to
  45.  *                support migration and shared stream offsets.
  46.  * The remaining types are for I/O handles
  47.  *    FSIO_LCL_FILE_STREAM    For a regular disk file stored locally.
  48.  *    FSIO_RMT_FILE_STREAM    For a remote Sprite file.
  49.  *    FSIO_LCL_DEVICE_STREAM    For a device on this host.
  50.  *    FSIO_RMT_DEVICE_STREAM    For a remote device.
  51.  *    FSIO_LCL_PIPE_STREAM    For an anonymous pipe buffered on this host.
  52.  *    FSIO_RMT_PIPE_STREAM    For an anonymous pipe bufferd on a remote host.
  53.  *                This type arises from process migration.
  54.  *    FSIO_CONTROL_STREAM    This is the stream used by the server for
  55.  *                a pseudo device to listen for new clients.
  56.  *    FSIO_SERVER_STREAM    The main state for a pdev request-response
  57.  *                connection.  Refereneced by the server's stream.
  58.  *    FSIO_LCL_PSEUDO_STREAM    A client's handle on a request-response
  59.  *                connection to a local pdev server.
  60.  *    FSIO_RMT_PSEUDO_STREAM    As above, but when the pdev server is remote.
  61.  *    FSIO_PFS_CONTROL_STREAM    Control stream for pseudo-filesystems.
  62.  *    FSIO_PFS_NAMING_STREAM    The request-response stream used for naming
  63.  *                operations in a pseudo-filesystem.  This
  64.  *                I/O handle is hung off the prefix table.
  65.  *    FSIO_LCL_PFS_STREAM    A clients' handle on a request-response
  66.  *                connection to a local pfs server.
  67.  *    FSIO_RMT_PFS_STREAM    As above, but when the pfs server is remote.
  68.  *    FSIO_RMT_CONTROL_STREAM    Needed only during get/set I/O attributes of
  69.  *                a pseudo-device whose server is remote.
  70.  *    FSIO_PASSING_STREAM    Used to pass streams from a pseudo-device
  71.  *                server to its client in response to an open.
  72.  *        Internet Protocols (Not implemented in the kernel (yet?))
  73.  *    FSIO_RAW_IP_STREAM    Raw Internet Protocol stream.
  74.  *    FSIO_UDP_STREAM        UDP protocol stream.
  75.  *    FSIO_TCP_STREAM        TCP protocol stream.
  76.  *
  77.  * The following streams are not implemented
  78.  *    FS_RMT_NFS_STREAM    NFS access implemented in kernel.
  79.  *    FS_RMT_UNIX_STREAM    For files on the old hybrid unix/sprite server.
  80.  *    FS_LCL_NAMED_PIPE_STREAM Stream to a named pipe whose backing file
  81.  *                is on the local host.
  82.  *    FS_RMT_NAMED_PIPE_STREAM Stream to a named pipe whose backing file
  83.  *                is remote. 
  84.  */
  85. #define FSIO_STREAM            0
  86. #define FSIO_LCL_FILE_STREAM        1
  87. #define FSIO_RMT_FILE_STREAM        2
  88. #define FSIO_LCL_DEVICE_STREAM        3
  89. #define FSIO_RMT_DEVICE_STREAM        4
  90. #define FSIO_LCL_PIPE_STREAM        5
  91. #define FSIO_RMT_PIPE_STREAM        6
  92. #define FSIO_CONTROL_STREAM        7
  93. #define FSIO_SERVER_STREAM        8
  94. #define FSIO_LCL_PSEUDO_STREAM        9
  95. #define FSIO_RMT_PSEUDO_STREAM        10
  96. #define FSIO_PFS_CONTROL_STREAM        11
  97. #define FSIO_PFS_NAMING_STREAM        12
  98. #define FSIO_LCL_PFS_STREAM        13
  99. #define FSIO_RMT_PFS_STREAM        14
  100. #define FSIO_RMT_CONTROL_STREAM        15
  101. #define FSIO_PASSING_STREAM        16
  102. #define FSIO_RAW_IP_STREAM        17
  103. #define FSIO_UDP_STREAM            18
  104. #define FSIO_TCP_STREAM            19
  105.  
  106. #define FSIO_NUM_STREAM_TYPES        20
  107.  
  108. /*
  109.  * Two arrays are used to map between local and remote types.  This has
  110.  * to happen when shipping Fs_FileIDs between clients and servers.
  111.  */
  112. extern int fsio_LclToRmtType[];
  113. extern int fsio_RmtToLclType[];
  114. /*
  115.  * Fsio_MapLclToRmtType(type) - Maps from a local to a remote stream type.
  116.  *    This returns -1 if the input type is out-of-range.
  117.  */
  118. #define Fsio_MapLclToRmtType(localType) \
  119.     ( ((localType) < 0 || (localType) >= FSIO_NUM_STREAM_TYPES) ? -1 : \
  120.     fsio_LclToRmtType[localType] )
  121. /*
  122.  * Fsio_MapRmtToLclType(type) - Maps from a remote to a local stream type.
  123.  *    This returns -1 if the input type is out-of-range.
  124.  */
  125. #define Fsio_MapRmtToLclType(remoteType) \
  126.     ( ((remoteType) < 0 || (remoteType) >= FSIO_NUM_STREAM_TYPES) ? -1 : \
  127.     fsio_RmtToLclType[remoteType] )
  128.  
  129.  
  130.  
  131.  
  132. /*
  133.  * STREAM SWITCH
  134.  *    These procedures are called by top-level procedures (i.e. Fs_Read,
  135.  *    or Fs_Select) to do stream-type specific processing.
  136.  */
  137.  
  138. typedef struct Fsio_StreamTypeOps {
  139.     int        type;            /* Stream types defined above */
  140.     /*
  141.      **************** Setup operation for clients. *************************
  142.      *    This routine sets up an I/O handle for a stream.  It uses streamData
  143.      *  that was genereated by the nameOpen routine on the file server.  As
  144.      *  a side effect it fills in the nameInfoPtr->fileID for use later
  145.      *  when getting/setting attributes.
  146.      *
  147.      *    FooIoOpen(ioFileIDPtr, flagsPtr, clientID, data, name, hdrPtrPtr)
  148.      *        Fs_FileID    *ioFileIDPtr;    (indicates object)
  149.      *        int        *flagsPtr;    (from the stream)
  150.      *        int        clientID;    (who's opening it)
  151.      *        ClientData    data;        (stream data from nameOpen)
  152.      *        char         *name;        (name for error messages)
  153.      *        Fs_HandleHeader    **hdrPtrPtr;    (Returned I/O handle)
  154.      */
  155.     ReturnStatus (*ioOpen) _ARGS_((Fs_FileID *ioFileIDPtr, int *flagsPtr, 
  156.                 int clientID, ClientData streamData, 
  157.                 char *name, Fs_HandleHeader **ioHandlePtrPtr));
  158.  
  159.     /*
  160.      **************** Regular I/O operations. ******************************
  161.      *  These are the standard read/write routines.  Note:  they are passed
  162.      *  a stream pointer to support streams shared accross the network.
  163.      *  A shared stream is indicated by FS_RMT_SHARED in the ioPtr->flags.
  164.      *    Note that only the fileID and the ioHandlePtr of the streamPtr
  165.      *    is guaranteed to be valid.  The stream-specific routine should ignore
  166.      *    the flags and offset kept (or not kept) in the stream structure.
  167.      *
  168.      *    FooRead(streamPtr, ioPtr, waitPtr, replyPtr)
  169.      *    FooWrite(streamPtr, ioPtr, waitPtr, replyPtr)
  170.      *        Fs_Stream    *streamPtr;    (See above about valid fields )
  171.      *        Fs_IOParam    *ioPtr;        (Standard parameter block)
  172.      *        Sync_RemoteWaiter *waitPtr;    (For remote waiting)
  173.      *        Fs_IOReply    *reply;        (For return length and signal)
  174.      */
  175.     ReturnStatus (*read) _ARGS_((Fs_Stream *streamPtr, Fs_IOParam *readPtr, 
  176.                 Sync_RemoteWaiter *remoteWaitPtr, 
  177.                 Fs_IOReply *replyPtr));
  178.     ReturnStatus (*write) _ARGS_((Fs_Stream *streamPtr, Fs_IOParam *writePtr, 
  179.                                   Sync_RemoteWaiter *remoteWaitPtr, 
  180.                   Fs_IOReply *replyPtr));
  181.     /*
  182.      **************** VM I/O operations. ******************************
  183.      *  These are the read/write routines used by VM during paging.
  184.      *    The interface is the same as the regular read and write routines,
  185.      *    so those routines can be re-used, if appropriate.
  186.      *
  187.      *    FooPageRead(streamPtr, ioPtr, waitPtr, replyPtr)
  188.      *    FooPageWrite(streamPtr, ioPtr, waitPtr, replyPtr)
  189.      *        Fs_Stream    *streamPtr;    (See above about valid fields)
  190.      *        Fs_IOParam    *ioPtr;        (Standard parameter block)
  191.      *        Sync_RemoteWaiter *waitPtr;    (For remote waiting)
  192.      *        Fs_IOReply    *reply;        (For return length and signal)
  193.      * 
  194.      *    FooBlockCopy(srcHdrPtr, destHdrPtr, blockNum)
  195.      *         Fs_HandleHeader *srcHdrPtr;  ( Handle for source file. )
  196.      *         Fs_HandleHeader *destHdrPtr; ( Handle for dest file. )
  197.      *         int        *blockNum;   ( Block number to copy. )
  198.      */
  199.     ReturnStatus (*pageRead) _ARGS_((Fs_Stream *streamPtr, Fs_IOParam *readPtr, 
  200.                 Sync_RemoteWaiter *remoteWaitPtr, 
  201.                 Fs_IOReply *replyPtr));
  202.     ReturnStatus (*pageWrite) _ARGS_((Fs_Stream *streamPtr,
  203.                       Fs_IOParam *writePtr, 
  204.                                       Sync_RemoteWaiter *remoteWaitPtr, 
  205.                       Fs_IOReply *replyPtr));
  206.     ReturnStatus (*blockCopy) _ARGS_((Fs_HandleHeader *srcHdrPtr, 
  207.                     Fs_HandleHeader *dstHdrPtr, 
  208.                     int blockNum));
  209.     /*
  210.      ***************** I/O Control. ****************************************
  211.      *  Stream-specific I/O controls.  The main procedure Fs_IOControl
  212.      *    handles some generic I/O controls, and then passes the I/O control
  213.      *    down to the stream-specific handler.
  214.      *
  215.      */
  216.     ReturnStatus (*ioControl) _ARGS_((Fs_Stream *streamPtr, 
  217.                       Fs_IOCParam *ioctlPtr, 
  218.                       Fs_IOReply *replyPtr));
  219.     /*
  220.      ***************** Select. *********************************************
  221.      *  The select interface includes three In/Out bit words.  There is
  222.      *  at most one bit set in each, and the selectability can be easily
  223.      *  turned off by clearing the word.  Never do anything to these
  224.      *  words other than leave them alone or clear them.
  225.      *
  226.      *    FooSelect(hdrPtr, waitPtr, readPtr, writePtr, exceptPtr)
  227.      *        Fs_HandleHeader        *hdrPtr;    (File handle)
  228.      *        Sync_RemoteWaiter    *waitPtr;    (Remote waiting info)
  229.      *        int            *readPtr;    (In/Out read bit)
  230.      *        int            *writePtr;    (In/Out write bit)
  231.      *        int            *exceptPtr;    (In/Out except bit)
  232.      */
  233.     ReturnStatus (*select)  _ARGS_((Fs_HandleHeader *hdrPtr, 
  234.                     Sync_RemoteWaiter *waitPtr, int *readPtr, 
  235.                     int *writePtr, int *exceptPtr));
  236.     /*
  237.      **************** Attribute operations on open streams. *****************
  238.      *    These just operate on the few attributes cached at the I/O server.
  239.      *  The name server is first contacted to set/initialize the attributes,
  240.      *  (either via the DOMAIN switch with pathnames,
  241.      *  or via the ATTRIBUTE switch with open streams)
  242.      *  and then these routines are called to complete the attributes from
  243.      *  ones cached on the I/O server, or to update the ones cached there.
  244.      *
  245.      *    FooGetIOAttr(fileIDPtr, clientID, attrPtr)
  246.      *    FooSetIOAttr(fileIDPtr, attrPtr, flags)
  247.      *        Fs_FileID        *fileIDPtr;    (Identfies file)
  248.      *        int            clientID;    (Client getting attrs)
  249.      *        Fs_Attributes        *attrPtr;    (Attrs to set/update)
  250.      *        int            flags;        (which attrs to set)
  251.      */
  252.     ReturnStatus (*getIOAttr) _ARGS_((Fs_FileID *fileIDPtr, int clientID, 
  253.                       Fs_Attributes *attrPtr));
  254.     ReturnStatus (*setIOAttr) _ARGS_((Fs_FileID *fileIDPtr, 
  255.                       Fs_Attributes *attrPtr, int flags));
  256.     /*
  257.      **************** Server verification of remote handle. *****************
  258.      *    This returns the server's file handle given a client's fileID.
  259.      *  There are two parts to this task.  The first is to map from the
  260.      *  client's fileID.type (i.e. FSIO_RMT_DEVICE_STREAM) to the server's
  261.      *  (i.e. FSIO_LCL_DEVICE_STREAM).  The second step is to check that the
  262.      *  client is recorded in the clientList of the I/O handle.  The domain
  263.      *    type is returned for use in naming operations.
  264.      *
  265.      *    Fs_HandleHeader *
  266.      *    FooClientVerify(fileIDPtr, clientID, domainTypePtr)
  267.      *        Fs_FileID    *fileIDPtr;        (Client's handle)
  268.      *        int        clientID;        (The client hostID)
  269.      *        int        *domainTypePtr;        (may be NIL)
  270.      */
  271.     Fs_HandleHeader *(*clientVerify) _ARGS_((Fs_FileID *fileIDPtr, 
  272.                          int clientID, int *domainTypePtr));
  273.     /*
  274.      *************** Migration calls. **************************************
  275.      *
  276.      *  The 'release' is called on the source client of migration via an RPC
  277.      *        from the I/O server.  Its job is to release any referneces
  278.      *        on the I/O handle that were due to a stream which has
  279.      *        now migrated away from the source client.
  280.      *  The 'migrate' is called from Fsio_DeencapStream to update client
  281.      *        book-keeping to reflect the migration.  The version on
  282.      *        remote clients just does an RPC to the I/O server to
  283.      *        invoke the appropriate migrate routine there.
  284.      *        Important:  If the FS_RMT_SHARED flag is present it means
  285.      *        that there is still a stream on the original client and its
  286.      *        references should not be removed from the I/O handle.
  287.      *        Also, if the FS_NEW_STREAM flag is present it means that
  288.      *        the stream is newly migrated to the client so references
  289.      *        should be added for the dstClient.
  290.      *  The 'migEnd' is called from Fsio_DeencapStream after the call to the
  291.      *        migrate procedure, but only the first time the stream
  292.      *        is migrated to the host.  (After that it suffices to
  293.      *        add references to the existing stream.)
  294.      *
  295.      *    FooRelease(hdrPtr, flags)
  296.      *        Fs_HandleHeader    *hdrPtr;        (File handle)
  297.      *        int        flags;            (From the stream)
  298.      *    FooMigEnd(migInfoPtr, size, data, hdrPtrPtr)
  299.      *        Fsio_MigInfo    migInfoPtr;        (Migration state)
  300.      *        int        size;            (size of data)
  301.      *        ClientData    data;            (data from migrate)
  302.      *        Fs_HandleHeader    **hdrPtrPtr;        (Returned handle)
  303.      *    FooSrvMigrate(migInfoPtr, dstClientID, flagsPtr, offsetPtr sizePtr, dataPtr)
  304.      *        Fsio_MigInfo    *migInfoPtr;        (Migration state)
  305.      *        int        dstClientID;        (ID of target client)
  306.      *        int        *flagsPtr;        (In/Out Stream flags)
  307.      *        int        *offsetPtr;        (Return - new offset)
  308.      *        int        *sizePtr;        (Return - size of data)
  309.      *        Address        *dataPtr;        (Return data)
  310.      */
  311.     ReturnStatus (*release) _ARGS_((Fs_HandleHeader *hdrPtr, int flags));
  312.     ReturnStatus (*migEnd) _ARGS_((Fsio_MigInfo *migInfoPtr, int size, 
  313.                   ClientData data, 
  314.                   Fs_HandleHeader **hdrPtrPtr));
  315.     ReturnStatus (*migrate) _ARGS_((Fsio_MigInfo *migInfoPtr, int dstClientID, 
  316.                     int *flagsPtr, int *offsetPtr, 
  317.                     int *sizePtr, Address *dataPtr));
  318.     /*
  319.      *************** Recovery calls. ****************************************
  320.      *  This (should be) two routines, one called on client host's top
  321.      *    reopen at the server, and one called on the server in response
  322.      *  to a client's reopen request.
  323.      *
  324.      *    FooReopen(hdrPtr, clientID, inData, outSizePtr, outDataPtr)
  325.      *        (The hdrPtr is only valid on clients.)
  326.      *        Fs_HandleHeader *hdrPtr;        (Handle to re-open)
  327.      *        (The following are only valid on servers.)
  328.      *        int        clientID;    (client doing the re-open)
  329.      *        ClientData    inData;        (state from the client)
  330.      *        int        *outSizePtr;    (sizeof outData)
  331.      *        ClientData    *outDataPtr;    (state returned to client)
  332.      */
  333.     ReturnStatus (*reopen)  _ARGS_((Fs_HandleHeader *hdrPtr, int clientID, 
  334.                     ClientData inData, int *outSizePtr,
  335.                     ClientData *outDataPtr));
  336.     /*
  337.      *************** Clean up operations. **********************************
  338.      * 'scavenge' is called periodically to clean up unneeded handles.
  339.      *        Important: the scavenge procedure must either remove or
  340.      *        unlock the handle it is still in use.
  341.      * 'clientKill' is called to clean up after dead clients.  This is
  342.      *        called before the scavenge routine if a periodic check
  343.      *        on the client fails, or called independently if some other
  344.      *        communication failure occurs.
  345.      * 'close' is called when the last reference to a stream is closed.
  346.      *        This routine should clean up any use/reference counts
  347.      *        due to the stream as indicated by the flags argument.
  348.      *
  349.      *    FooScavenge(hdrPtr)
  350.      *        Fs_HandleHeader    *hdrPtr;        (File handle)
  351.      *    FooClientKill(hdrPtr, clientID)
  352.      *        Fs_HandleHeader    *hdrPtr;        (File handle)
  353.      *        int        clientID;        (Client presumed down)
  354.      *    FooClose(hdrPtr, clientID, procID, flags, size, data)
  355.      *        Fs_HandleHeader    *hdrPtr;        (File handle)
  356.      *        int        clientID;        (Host ID of closer)
  357.      *        Proc_Pid    procID;            (ProcessID of closer)
  358.      *        int        flags;            (From the stream)
  359.      *        int        size;            (Size of data)
  360.      *        ClientData    data;            (Extra close data)
  361.      */
  362.     Boolean     (*scavenge) _ARGS_((Fs_HandleHeader *hdrPtr));
  363.     void     (*clientKill) _ARGS_((Fs_HandleHeader *hdrPtr, int clientID));
  364.     ReturnStatus (*close) _ARGS_((Fs_Stream *streamPtr, int clientID, 
  365.                   Proc_PID procID, int flags, int dataSize, 
  366.                   ClientData closeData));
  367. } Fsio_StreamTypeOps;
  368.  
  369. extern Fsio_StreamTypeOps fsio_StreamOpTable[];
  370.  
  371. typedef struct FsioStreamClient {
  372.     List_Links links;        /* This hangs off the stream */
  373.     int        clientID;    /* The sprite ID of the client */
  374. } FsioStreamClient;
  375.  
  376.  
  377.  
  378. /*
  379.  * The following structures are subfields of the various I/O handles.
  380.  * First we define a use count structure to handle common book keeping needs.
  381.  */
  382.  
  383. typedef struct Fsio_UseCounts {
  384.     int        ref;        /* The number of referneces to handle */
  385.     int        write;        /* The number of writers on handle */
  386.     int        exec;        /* The number of executors of handle */
  387. } Fsio_UseCounts;
  388.  
  389. /*
  390.  * Exported type for async I/O requests.
  391.  */
  392.  
  393. typedef struct Fsio_Request *Fsio_RequestToken;
  394.  
  395. extern Fsio_RequestToken Fsio_DeviceBlockIOAsync();
  396. extern Fsio_DeviceBlockIOPoll();
  397.  
  398.  
  399. /*
  400.  * Recovery testing switch table.
  401.  */
  402. typedef struct Fsio_RecovTestInfo {
  403.     int        (*refFunc)();        /* number of references */
  404.     int        (*numBlocksFunc)();    /* number of blocks in the cache */
  405.     int        (*numDirtyBlocksFunc)();/* number of dirty blocks in cache */
  406. } Fsio_RecovTestInfo;
  407.  
  408. extern    Fsio_RecovTestInfo    fsio_StreamRecovTestFuncs[];
  409.  
  410. /*
  411.  * Initialization
  412.  */
  413. extern void Fsio_InstallStreamOps _ARGS_((int streamType,
  414.             Fsio_StreamTypeOps *streamOpsPtr));
  415.  
  416. extern ReturnStatus Fsio_CreatePipe _ARGS_((Fs_Stream **inStreamPtrPtr, 
  417.             Fs_Stream **outStreamPtrPtr));
  418.  
  419. extern void Fsio_Bin _ARGS_((void));
  420. extern void Fsio_InitializeOps _ARGS_((void));
  421.  
  422. /*
  423.  * Stream client list functions.
  424.  */
  425. extern Boolean Fsio_StreamClientOpen _ARGS_((List_Links *clientList,
  426.             int clientID, int useFlags, Boolean *foundPtr));
  427. extern Boolean Fsio_StreamClientClose _ARGS_((List_Links *clientList, 
  428.             int clientID));
  429. extern Boolean Fsio_StreamClientFind _ARGS_((List_Links *clientList, 
  430.             int clientID));
  431.  
  432. /*
  433.  * Stream manipulation routines.
  434.  */
  435. extern Fs_Stream *Fsio_StreamCreate _ARGS_((int serverID, int clientID,
  436.             Fs_HandleHeader *ioHandlePtr, int useFlags, char *name));
  437. extern Fs_Stream *Fsio_StreamAddClient _ARGS_((Fs_FileID *streamIDPtr,
  438.             int clientID, Fs_HandleHeader *ioHandlePtr, 
  439.             int useFlags, char *name, Boolean *foundClientPtr, 
  440.             Boolean *foundStreamPtr));
  441. extern void Fsio_StreamMigClient _ARGS_((Fsio_MigInfo *migInfoPtr, 
  442.             int dstClientID, Fs_HandleHeader *ioHandlePtr, 
  443.             Boolean *closeSrcClientPtr));
  444. extern Fs_Stream *Fsio_StreamClientVerify _ARGS_((Fs_FileID *streamIDPtr, 
  445.             Fs_HandleHeader *ioHandlePtr, int clientID));
  446. extern void Fsio_StreamCreateID _ARGS_((int serverID, Fs_FileID *streamIDPtr));
  447. extern void Fsio_StreamCopy _ARGS_((Fs_Stream *oldStreamPtr,
  448.             Fs_Stream **newStreamPtrPtr));
  449. extern void Fsio_StreamDestroy _ARGS_((Fs_Stream *streamPtr));
  450. extern ReturnStatus Fsio_StreamMigCloseNew _ARGS_((Fs_Stream *streamPtr, 
  451.             Boolean *inUsePtr, int *offsetPtr));
  452. extern ReturnStatus Fsio_StreamReopen _ARGS_((Fs_HandleHeader *hdrPtr, 
  453.             int clientID, ClientData inData, int *outSizePtr, 
  454.             ClientData *outDataPtr));
  455.  
  456.  
  457.  
  458. /*
  459.  * Migration support
  460.  */
  461. extern ReturnStatus Fsio_EncapStream _ARGS_((Fs_Stream *streamPtr, 
  462.             Address bufPtr));
  463. extern ReturnStatus Fsio_DeencapStream _ARGS_((Address bufPtr,
  464.             Fs_Stream **streamPtrPtr));
  465. extern void Fsio_MigrateUseCounts _ARGS_((int flags, 
  466.             Boolean closeSrcClient, Fsio_UseCounts *usePtr));
  467. extern void Fsio_MigrateClient _ARGS_((List_Links *clientList, int srcClientID,
  468.             int dstClientID, int flags, Boolean closeSrcClient));
  469.  
  470. /*
  471.  * Null procs for switch tables.
  472.  */
  473. extern void Fsio_NullClientKill _ARGS_((Fs_HandleHeader *hdrPtr, int clientID));
  474. extern void Fsio_StreamClientKill _ARGS_((Fs_HandleHeader *hdrPtr, int clientID));
  475. extern ReturnStatus Fsio_NullProc ();
  476. extern ReturnStatus Fsio_NoProc ();
  477. extern Fs_HandleHeader *Fsio_NoHandle ();
  478.  
  479.  
  480. #endif
  481.